package com.cq.hd.generator.config;

import com.baomidou.mybatisplus.annotation.DbType;
import com.baomidou.mybatisplus.generator.config.DataSourceConfig;
import com.baomidou.mybatisplus.generator.config.converts.MySqlTypeConvert;

/**
 * @description: 数据源配置
 * @author: mYunYu
 * @date: 2021/7/7 15:11
 * @version: v1.0
 */
public class MyDataSourceConfig {

    public DataSourceConfig getDataSourceConfig(){
        DataSourceConfig dataSourceConfig = new DataSourceConfig();
        dataSourceConfig.setDbType(DbType.MYSQL);
        dataSourceConfig.setTypeConvert(new MySqlTypeConvert() {});
        dataSourceConfig.setDriverName("com.mysql.cj.jdbc.Driver");
        dataSourceConfig.setUsername("hd-o2o");
        dataSourceConfig.setPassword("DxRMfkyahFNhFAf7");
        dataSourceConfig.setUrl("jdbc:mysql://116.62.79.131:3306/hd-o2o?nullCatalogMeansCurrent=true&useSSL=false&serverTimezone=GMT%2B8&characterEncoding=UTF-8&allowMultiQueries=true");


        return dataSourceConfig;
    }

}
